#include <bits/stdc++.h>

using namespace std;

int main() {
	int t;
	cin >> t;
	while(t -- ) {
		int n;
		cin >> n;
		int ll = 1, l = 1, now;
		if(n == 1 || n == 2) {
			cout << 1 << endl;
			continue;
		} 
		for(int i = 3; i <= n; i ++ ) {
			now = ll + l;
			ll = l;
			l = now;
		}
		cout << now << endl;
	}
	return 0;
}

